Algorithms by Robert Sedgewick
Author:Robert Sedgewick [Sedgewick, Robert]
Language: eng
Format: epub, pdf
Publisher: Addison Wesley
Published: 2014-01-22T13:14:37+00:00
472
CHAPTER 3 ■ Searching
Clustering. The average cost of linear probing depends on the way in which the entries
clump together into contiguous groups of occupied table entries, called clusters, when
they are inserted. For example, when the key C is inserted
in our example, the result is a cluster ( A C S ) of length
9 / 64 chance of new key
hitting this cluster
3, which means that four probes are needed to insert H
before
because H hashes to the first position in the cluster. Short
key lands here
clusters are certainly a requirement for efficient perfor-in that event
mance. This requirement can be problematic as the table
fills, because long clusters are common. Moreover, since
and forms a much
longer cluster
after
all table positions are equally likely to be the hash value
of the next key to be inserted (under the uniform hashing assumption), long clusters are more likely to increase
Clustering in linear probing (M = 64)
in length than short ones, because a new key hashing to
any entry in the cluster will cause the cluster to increase
in length by 1 (and possibly much more, if there is just one table entry separating the
cluster from the next one). Next, we turn to the challenge of quantifying the effect of
clustering to predict performance in linear probing, and using that knowledge to set
design parameters in our implementations.
linear probing
random
= 1 / 2
long clusters are common
keys[0..127]
= 1 / 4
keys[8064..8192]
Table occupancy patterns (2,048 keys, tables laid out in 128-position rows)
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Coding Theory | Localization |
Logic | Object-Oriented Design |
Performance Optimization | Quality Control |
Reengineering | Robohelp |
Software Development | Software Reuse |
Structured Design | Testing |
Tools | UML |
Deep Learning with Python by François Chollet(12569)
Hello! Python by Anthony Briggs(9914)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9795)
The Mikado Method by Ola Ellnestam Daniel Brolund(9777)
Dependency Injection in .NET by Mark Seemann(9337)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8296)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7763)
Grails in Action by Glen Smith Peter Ledbrook(7696)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7557)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(7063)
Microservices with Go by Alexander Shuiskov(6824)
Practical Design Patterns for Java Developers by Miroslav Wengner(6741)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6685)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6413)
Angular Projects - Third Edition by Aristeidis Bampakos(6089)
The Art of Crafting User Stories by The Art of Crafting User Stories(5616)
NetSuite for Consultants - Second Edition by Peter Ries(5555)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5359)
Kotlin in Action by Dmitry Jemerov(5062)
